import {
    createRouter,
    createWebHashHistory
} from 'vue-router';

// 导入要加载的页面组件
import Index from '@/pages/index.vue';
import Free from '@/pages/free.vue';
import Goods from '@/pages/goods.vue';
import Order from '@/pages/order.vue';
import User from '@/pages/user.vue';
import Details from '@/pages/details.vue';

// 创建路由规则
const routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        component: Index
    },
    {
        path: '/free',
        component: Free
    },
    {
        path: '/goods',
        component: Goods
    },
    {
        path: '/order',
        component: Order
    },
    {
        path: '/user',
        component: User
    },
    {
        path: '/details',
        component: Details
    }
    
];



const router = createRouter({
    history: createWebHashHistory(),
    routes
  })

  export default router;